import request from '@/utils/request'
import store from '@/store/index'
const base = require('../../env/index')

// 夹带k_token
function addK_Token(data) {
    var token = {
        k_token: store.getters.k_token
    }
    Object.assign(data, token)
    return data
}
export function getDimension(data) {
    return request({
        url: base.question_url + '/api/v1/admin/dimension/infos',
        method: 'POST',
        headers: {},
        data: addK_Token(data)
    })
}
export function addDimension(data) {
    return request({
        url: base.question_url + '/api/v1/admin/dimension/save',
        method: 'POST',
        headers: {},
        data: addK_Token(data)
    })
}
export function addDimensionGroup(data) {
    return request({
        url: base.question_url + '/api/v1/admin/dimension/group/saveAll',
        method: 'POST',
        headers: {},
        data: addK_Token(data)
    })
}

export function addDimensionRateGroup(data) {
    return request({
        url: base.question_url + '/api/v1/admin/dimension/rate/saveAll',
        method: 'POST',
        headers: {},
        data: addK_Token(data)
    })
}
export function getAlldimension(data) {
    return request({
        url: '/question_url/api/v1/admin/dimension/group/alldimension',
        method: 'POST',
        headers: {},
        data: addK_Token(data)
    })
}

